package com.ljl.test;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.entity.Billrecord;
import com.entity.Invoice;
import com.entity.Odo;
import com.entity.Orderdetail;
import com.entity.Payrecord;
import com.service.ljl.billrecordservice;
import com.service.ljl.invoivceservice;
import com.service.ljl.orderdetailservice;


public class invoicetest {
	private invoivceservice invoivceservice;
	@Before
	public void init() {
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
		invoivceservice=ac.getBean(invoivceservice.class);
	}
	@After
	public void tearDown() {
		invoivceservice=null;
	}
	
	@Test
	public void add() {
		Odo odo=new Odo();
		odo.setOdoId(8);
		Invoice invoice=new Invoice();
		invoice.setOdo(odo);
		invoivceservice.add(invoice);
	}

}
